﻿using System;
using System.Drawing.Design;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms.Design;
using System.Windows.Forms;
using Microsoft.Practices.WizardFramework;
using System.Collections;

namespace com.Editors
{
    public class DataEditor : UITypeEditor 
    {
        public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
        {
            return UITypeEditorEditStyle.Modal;
        }

        public override object EditValue(ITypeDescriptorContext context,
            IServiceProvider provider, object value)
        {
            /**object svc = provider.GetService(typeof(IWindowsFormsEditorService));
            if (svc == null)
            {
                return base.EditValue(context, provider, value);
            }*/

            DataForm form = new DataForm(provider);
            form.Show();

            
            //else
            //    dictionaryService.SetValue("ClassName", textBox1.Text.ToString());

            //while (! form.isFormDone())
            //{
                
            //}
            return new ArrayList();
            //return DataForm.GetConStr();
        }
    }
}
